<?php
class Get_userinfo extends MY_Controller
{	
	function __construct() {
        parent::__construct();
    }
    function index(){
        // print_r($_POST);exit;
    	$data = $this->user_post_data;
        if(!empty($data)){
            $userid = $data['user_token']['user_id'];
            $sql = "SELECT id,nick,mobile,head_img_url FROM tiku_users WHERE id = '{$userid}'";
            $result = $this->db->query($sql)->row_array();
            echo json_encode(array("code" => 1, "user" => $result));   // 
        }else{
            echo json_encode(array("code" => 404, "user" => 'not user'));
        }
    }


}